package edu.jd.movieplatform.admin.a_comment.impl;

import edu.jd.movieplatform.admin.a_comment.a_CommentDto;
import edu.jd.movieplatform.admin.a_comment.a_CommentService;
import edu.jd.movieplatform.admin.a_comment.dao.a_CommentDao;
import edu.jd.movieplatform.common.Utils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Map;

@Service
@Transactional
public class a_CommentServiceImpl implements a_CommentService {

    @Resource
    private a_CommentDao a_commentDao;


    @Override
    public Map<String, Object> getCommentList(a_CommentDto dto) {
        return Utils.getPage(dto,()->a_commentDao.findCommentList(dto));
    }


    @Override
    public void deleteComment(Integer id) {
        a_commentDao.deleteComment(id);
    }
}
